home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Special 17
/
AMIGAplus Sonderheft 17 (1999)(ICP)(DE)[!].iso
/
PD
/
Anwendungen
/
AmiCAD
/
ARexx_english
/
NewScript.AmiCAD
< prev
next >
Wrap
Text File
|
1998-06-17
|
1KB
|
45 lines
/* NewScript.AmiCAD, 3 Mars 1998 © R.Florac, version 1.00e */
/* This script loads a new script in an editor for editing.
It's written for my text editor, Amitex. Adapt it to your
own editor to suit to your needs. */
signal on error /* for error handling */
signal on syntax
options results
cr='0a'x
port = ADDRESS() /* reads the ARexx port name */
address command
if ~show(p, "AMITEX") then do
f=0 /* the editor was not running */
'run > nil:' "c:AmiTex" /* loads the editor */
waitforport "AMITEX"
end
else f=1 /* it was allready running */
ADDRESS(AMITEX)
if f=1 then 'NEW("New.AmiCAD")' /* ask for opening a new window */
'LOAD("Work:AmiCAD/ARexx/New.AmiCAD")' /* loads the script "New.AmiCAD" */
'ASK("What''s the name'cr'of this new script ?")' /* ask for the title */
titre = result||'.AmiCAD'
if titre ~= "" then 'FILENAME("Work:AmiCAD/ARexx/'titre'")' /* rename the window */
'GOTO(1,10)'
exit
/* Traitement des erreurs, interruption du programme */
syntax:
address (port)
erreur=RC
'MESSAGE("Script NewScript.amiCAD :"+CHR(10)+"Syntax error"+CHR(10)+"in line 'SIGL'"+CHR(10)+"'errortext(erreur)'")'
exit
error:
address (port)
'MESSAGE("Script NewScript.amiCAD :"+CHR(10)+"Error in line 'SIGL'")'
exit